import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const USER: AppRouteRecordRaw = {
  path: '/user',
  name: 'user',
  component: DEFAULT_LAYOUT,
  // component: () => import('@/views/user/userManage/index.vue'),
  meta: {
    locale: 'menu.user',
    icon: 'iconfont icon-zhanghuguanli',
    requiresAuth: true,
    order: 2,
    hideInMenu: false,
    permCode: 'A020000000',
  },
  children: [
    {
      path: 'userManage',
      name: 'UserManage',
      component: () => import('@/views/user/userManage/index.vue'),
      meta: {
        locale: 'menu.user.userManage',
        requiresAuth: true,
        // hideInMenu: true,
        roles: ['*'],
        permCode: 'A020100000',
      },
    },
    {
      path: 'role',
      name: 'Role',
      component: () => import('@/views/user/role/index.vue'),
      meta: {
        locale: 'menu.user.role',
        requiresAuth: true,
        // hideInMenu: true,
        roles: ['*'],
        permCode: 'A020200000',
      },
    }
  ],
};

export default USER;
